<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        span{
            /*padding:  5px;*/
            background: #c0bebe;
            border: 2px solid #fff;
            font-size: 14px;
            border-radius: 4px;
            text-align: center;
        }

        button{
            height: 20px;
            line-height: 15px;
        }

    </style>
</head>
<body>



    1、<span> [] == ![] </span> 输出结果是？
        <select id="q1">
            <option selected disabled hidden>请选择</option>
            <option value = 999>true</option>
            <option value = "">false</option>
        </select>
    <button onclick="q1()">提交</button><br>

    2、<span> {} == !{} </span> 输出结果是？
        <select id="q2">
            <option selected disabled hidden>请选择</option>
            <option value = 999>true</option>
            <option value = "">false</option>
        </select>
    <button onclick="q2()">提交</button><br>

    3、<span> 1 + '1' </span>输出结果是？<input type="text" name="" id="q3"> <button onclick="q3()">提交</button><br>
    4、<span> true + true </span> 输出结果是？<input type="text" name="" id="q4"> <button onclick="q4()">提交</button><br>
    5、<span> 4 + [] </span>输出结果是？<input type="text" name="" id="q5"> <button onclick="q5()">提交</button><br>
    6、<span> 4 + {} </span> 输出结果是？<input type="text" name="" id="q6"> <button onclick="q6()">提交</button><br>
    7、<span> 4 + [1] </span> 输出结果是？<input type="text" name="" id="q7"> <button onclick="q7()">提交</button><br>
    8、<span> 4 + [1, 2, 3, 4] </span> 输出结果是？<input type="text" name="" id="q8"> <button onclick="q8()">提交</button><br>
    9、<span> 'a' + + 'b' </span>输出结果是？<input type="text" name="" id="q9"> <button onclick="q9()">提交</button><br>

</body>

<script>

    function q1() {
        alertInfo(([] == ![]) === Boolean(document.getElementById("q1").value))
    }

    function q2() {
        alertInfo({} == !{} === Boolean(document.getElementById("q2").value))
    }


    function alertInfo(result) {
        if (result) {
            alert("回答正确");
        } else {
            alert("回答错误")
        }
    }
</script>


</html>